define(function(require, exports, module) {
  var View = Backbone.View.extend({
    el: '.content-wrapper',
    template: require('main/admin/layouts/content/template.handlebars'),
    initialize: function(options) {
      options = options || {};

      var viewData = options.viewData || {
        title: 'Title',
        crumbs: [{
          active: true,
          link: '#',
          icon: 'fa fa-dashboard',
          label: 'Home'
        }]
      };

      var ContentView = options.ContentView;

      if(!_.isFunction(ContentView)) {
        ContentView = function(opt) { return (new Backbone.View.extend()(opt)); };
      }

      this.$el.html(this.template({view: viewData}));

      this.$el.find('.content').html(ContentView({
        rel: options.rel || ''
      }).render().el);
    }
  });

  module.exports = function(options) {
    return ( new View(options) );
  }
});